export const storage = {
  //存储
  set(key: string, value: any){
    localStorage.setItem(key, JSON.stringify(value))
  },

  //取出数据
  get(key: string){
    const value = localStorage.getItem(key);
    if(value && value !== 'undefined' && value !== 'null'){
      return JSON.parse(value)
    }
  },

  //删除数据
  remove(key: string){
    localStorage.removeItem(key)
  }
}